<?php
/**
 * 全测试
 * @author liuhui 2009-6-12
 */
//error_reporting(E_ALL | E_STRICT);


require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/TextUI/TestRunner.php';
date_default_timezone_set('Asia/Shanghai');
PHPUnit_Util_Filter::addDirectoryToFilter(dirname(__FILE__));
require_once 'tests/base/BaseSetUp.php';
require_once 'tests/dao/categorysDaoTest.php';
require_once 'tests/dao/linksDaoTest.php';

require_once 'tests/service/categorysServiceTest.php';
require_once 'tests/service/linksServiceTest.php';

class AllTests {

    # 需要返回return 否则测试无法执行
    public static function suite () {
        BaseSetUp::setUp();
        return self::registerTest();
    }

    private static function registerTest () {
        $suite = new PHPUnit_Framework_TestSuite('webnav');
        $suite->addTestSuite('CategorysDaoTest');
        $suite->addTestSuite('LinksDaoTest');
        $suite->addTestSuite('CategorysServiceTest');
        $suite->addTestSuite('LinksServiceTest');
        return $suite;
    }
}

